﻿using SCM.Common;
using SCM.Model.Enums;
using SqlSugar;
using System;

namespace SCM.Model.DBEntity
{
    /// <summary>
    /// 业务异常日志表
    /// </summary>
    [SugarTable("T_BusinessExceptionLog")]
    public class T_BusinessExceptionLog
    {
        /// <summary>
        /// 业务异常日志ID
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 异常内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 请求地址
        /// </summary>
        public string RequestUrl { get; set; }

        /// <summary>
        /// 客户IP地址
        /// </summary>
        public string ClientIP { get; set; }

        /// <summary>
        /// 操作账户
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 异常处理状态
        /// </summary>
        public ProcessFlagEnum? ProcessFlag { get; set; }

        /// <summary>
        /// 数据状态字符串
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ProcessFlagStr
        {
            get { return ProcessFlag.HasValue ? EnumHelper.GetDescription(ProcessFlag.Value) : ""; }
        }

        /// <summary>
        /// 报文内容
        /// </summary>
        public string RequestData { get; set; }

        /// <summary>
        /// 插入时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }
}
